aux_source_directory(. SRC)

# string(REPLACE ";" " " ttSRC "${SRC}")
# string(REPLACE "./" "" ttSRC "${ttSRC}")
# string(REGEX REPLACE ".*/(.*)" "\\1" CURRENT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR})
# # MESSAGE(STATUS "当前目录名：" ${CURRENT_FOLDER})
# message(STATUS "${CURRENT_FOLDER}-SRC = ${ttSRC}")
find_package(PkgConfig REQUIRED)
pkg_search_module(HIREDIS REQUIRED IMPORTED_TARGET hiredis)

foreach(FILE_PATH ${SRC})
	string(REGEX REPLACE ".+/(.+)\\..*" "\\1" FILE_NAME ${FILE_PATH})
	list(FIND NOT_COMPILE ${FILE_NAME} RESULT)
	if(${RESULT} EQUAL -1)
		include_directories(${INCLUDE})
		add_executable(${FILE_NAME} ${FILE_PATH})
		target_link_libraries(${FILE_NAME} 
            PRIVATE muduo_c11
            PRIVATE PkgConfig::HIREDIS
        )
	endif()
endforeach()